<%@page import="java.util.*,hyper.market.beans.*,java.io.*"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<jsp:useBean id="staffList" class="java.util.ArrayList" scope="session"/>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Staff Table</title>
        <link rel="stylesheet" href="style/desk.css" type="text/css" />
    </head>
    <body>
        <br>
        <br>
        <br>
         <table  style="width:80%"><tr>
                        <th><strong>Staff Id</strong></th>
                        <th><strong>Name</strong></th>
                        <th><strong>Role</strong></th>
                        <th><strong>Contact No.</strong></th>
                        <th><strong>Joined Date</strong></th></tr>

                    <tbody id="stafftable">
                        <%
                                    for (int count = 0; count < staffList.size(); count++) {
                                        if (((StaffBean) staffList.get(count)).getManager() == 1) {
                                            out.println(" <tr onmouseout='moutStream(this);' onmouseover='hovStream(this);' class='selected'>");
                                        } else {
                                            if (count % 2 != 1) {
                                                out.println("<tr onmouseout='moutStream(this);' onmouseover='hovStream(this);' class='light'> ");
                                            } else {
                                                out.println("<tr onmouseout='moutStream(this);' onmouseover='hovStream(this);' class='dark'> ");
                                            }
                                        }
                                        out.println(" <td class='staffid'>" + ((StaffBean) staffList.get(count)).getStaffid() + "</td>");
                                        out.println("<td class='name'>" + ((StaffBean) staffList.get(count)).getLoginName() + "</td>");
                                        out.println(" <td class='joined'>" + ((StaffBean) staffList.get(count)).getRole() + "</td>");
                                        out.println("<td class='name'>" + ((StaffBean) staffList.get(count)).getContact() + "</td>");
                                        out.println(" <td class='joined'>" + ((StaffBean) staffList.get(count)).getJoinedDate() + "</td>");
                                        out.println("</tr>");
                                    }
                        %>
                    </tbody>
                </table>

    </body>
</html>
